package cn.darkhorse.device.vo;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class MesRepairInfoVO extends BaseEntity implements TransPojo {
    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("维修单号")
    @Size(min = 0, max = 50, message = "维修单号不能超过50个字符")
    @Excel(name = "维修单号")
    private String repairNum;

    @ApiModelProperty("维修状态（0：待维修 1：已完成 2：已驳回）")
    @Excel(name = "维修状态", readConverterExp = "0=待派单,1=待接单,2=维修中,3=已完成")
    @Trans(type = TransType.DICTIONARY,key = "repair_status")
    private Integer repairStatus;

    @ApiModelProperty("审核状态（0：待审1：已审2：审核中）")
    @Excel(name = "审核状态", readConverterExp = "0=待审,1=已审,2=审核中")
    private Integer auditStatus;

    @ApiModelProperty("所属部门")
    private Long dept;
    @Excel(name = "所属部门")
    private String deptName;

    @ApiModelProperty("设备id")
    private Long deviceId;

    @ApiModelProperty("设备编号")
    @Excel(name = "设备编号")
    private String deviceCode;

    @ApiModelProperty("设备名称")
    @Excel(name = "设备名称")
    private String deviceName;

    @ApiModelProperty("设备代号")
    @Excel(name = "设备代号")
    private String deviceMark;

    @ApiModelProperty("设备类型")
    private Long deviceType;
    @Excel(name = "设备类型")
    private String deviceTypeName;
    @ApiModelProperty("规格/型号")
    @Excel(name = "规格/型号")
    private String deviceModel;

    @ApiModelProperty("故障类型")
    private Long malfunctionType;
    @ApiModelProperty("故障类型(手输)")
    @Excel(name = "报修故障类型")
    private String malfunctionTypeStr;
    @ApiModelProperty("故障类型(手输)")
    @Excel(name = "维修故障类型")
    private String repairMalfunctionTypeStr;

    @ApiModelProperty("故障描述")
    @Size(min = 0, max = 100, message = "故障描述长度不能超过100个字符")
    @Excel(name = "报修故障描述")
    private String malfunctionDescription;
    @ApiModelProperty("维修故障描述")
    @Excel(name = "维修故障描述")
    private String repairMalfunctionDescription;
    @ApiModelProperty("维修过程描述")
    @Excel(name = "维修过程描述")
    private String repairProcessDescription;

    @ApiModelProperty("故障图片")
    private String malfunctionPic;

    @ApiModelProperty("申请备件（0：否1：是）")
    private Integer applyStatus;

    @ApiModelProperty("完成时间")
    @Excel(name = "完成时间",dateFormat ="yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime finishDate;
    /**
     * 设备负责人
     */
    private Long header;
    @Excel(name = "设备负责人")
    private String headerName;
    @ApiModelProperty("报修人")
    private Long repairer;
    @Excel(name = "报修人")
    private String repaierName;

    @ApiModelProperty("报修时间")
    @Excel(name = "报修时间",dateFormat ="yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime repairDate;

    @ApiModelProperty("接单人")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long receiver;
    @Excel(name = "接单人")
    private String receiverName;

    @ApiModelProperty("接单时间")
    @Excel(name = "接单时间",dateFormat ="yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime receiveDate;

    @ApiModelProperty("审核人")
    private Long approver;
    @Excel(name = "审核人")
    private String approverName;

    @ApiModelProperty("审核时间")
    @Excel(name = "审核时间",dateFormat ="yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime approveTime;

    @ApiModelProperty("登记制单人")
    private Long receiveCreator;

    private String receiverCreatorName;

    @ApiModelProperty("登记制单时间")
    private LocalDateTime receiveCreatorDate;




    @ApiModelProperty("登记制单部门")
    private Long reviceCreatorDept;
    private String reviceCreatorDeptName;

    @ApiModelProperty("附件")
    private String attachments;
    @ApiModelProperty("备件使用情况")
    private String spareUseInfo;

    /**
     * 备件申请记录
     */
    List<MesSpareApplyRecordsVO> mesSpareApplyRecordsVOList;
    /**
     * 评价级别
     */
    @Excel(name = "评价")
    private Integer level;

    /**
     * 备件数量
     */
    private BigDecimal spareNum;

    /**
     * 评价Id
     */
    private Long evaluateId;
    
    
    private String maintenancePersons;
    @Excel(name = "登记维修人员")
    private String maintenancePersonNames;
    private String assignedPersons;
    @Excel(name = "已分配人员")
    private String assignedPersonNames;
    
}
